package service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.ClientDao;
import po.Client;
import service.ClientService;

@Service("clientService")
public class ClientServiceImpl implements ClientService {

	@Autowired
	private ClientDao clientDao;
	
	@Override
	public boolean existClient(String name) {
		return clientDao.existClient(name);
	}

	@Override
	public Client login(String  cname,String cpassword) {

		return clientDao.login(cname, cpassword);
	}

	@Transactional
	@Override
	public Integer regist(Client c) {
		return clientDao.regist(c);
	}

	@Transactional
	@Override
	public boolean updateClient(Client c) {
 
		return clientDao.updateClient(c);
	}

}
